﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace FinanceAPI.Model
{
    /// <summary>
    /// 表示聚合根类型的基类型。
    /// </summary>
    [Serializable]
    public abstract class AggregateRoot 
    {
        #region Protected Fields
        [Key]
        protected Guid id;
        #endregion



        #region IEntity Members
        /// <summary>
        /// 获取当前领域实体类的全局唯一标识。
        /// </summary>
        public Guid ID
        {
            get;set;
        } = Guid.NewGuid();

        public DateTime? RowModifyDateTime
        {
            get;
            set;
        } = DateTime.Now;

        #endregion
    }
}
